package ATM.gui;

import java.awt.event.ActionListener;

import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.event.ActionEvent;

public class MenuCust extends JPanel {

	private JLabel lblBalance;
	private JButton btnViewBalance;
	private JButton btnWtihdrawCash;
	private JButton btnDepositFunds;
	private JButton btnExit;
	Screen screen;

	/**
	 * Create the panel.
	 * 
	 * @param screen
	 */
	public MenuCust(Screen screen) {
		setLayout(null);
		this.screen = screen;

		lblBalance = new JLabel("Balance");
		lblBalance.setBounds(362, 11, 239, 29);
		add(lblBalance);

		btnViewBalance = new JButton("View Balance");
		btnViewBalance.setActionCommand("ViewBalance");
		btnViewBalance.addActionListener(screen.getaL());
		btnViewBalance.setBounds(183, 129, 136, 85);
		add(btnViewBalance);

		btnWtihdrawCash = new JButton("Wtihdraw Cash");
		btnWtihdrawCash.setActionCommand("WtihdrawCash");
		btnWtihdrawCash.addActionListener(screen.getaL());
		btnWtihdrawCash.setBounds(361, 129, 136, 85);
		add(btnWtihdrawCash);

		btnDepositFunds = new JButton("Deposit funds");
		btnDepositFunds.setActionCommand("Deposit");
		btnDepositFunds.addActionListener(screen.getaL());
		btnDepositFunds.setBounds(183, 225, 136, 85);
		add(btnDepositFunds);

		btnExit = new JButton("Exit");
		btnExit.setActionCommand("Exit");
		btnExit.addActionListener(screen.getaL());
		btnExit.setBounds(362, 225, 136, 85);
		add(btnExit);

		JLabel image = (new JLabel(screen.getVariables().getImage1()));
		image.setBounds(0, 0, 640, 480);
		add(image);
	}

	public JLabel getLblBalance() {
		return lblBalance;
	}

	public void setLblBalance(JLabel lblBalance) {
		this.lblBalance = lblBalance;
	}

}
